queryRecentCalls

abstract fun queryRecentCalls(cursor: String, count: Int, completion: CompletionHandler?)

Query recent call records with pagination support. Pass an empty string as the initial cursor. For subsequent requests, use the cursor returned in the previous response to fetch the next page. Results are updated asynchronously in state.recentCalls.

Usage Example

import io.trtc.tuikit.atomicxcore.api.call.*

// First query
CallStore.shared.queryRecentCalls(cursor = "", count = 20) { code, message ->
}

// Load more
val cursor = CallStore.shared.callState.cursor.value
CallStore.shared.queryRecentCalls(cursor = cursor, count = 20) { code, message ->
}

Parameters

cursor

Pagination cursor, pass empty string for first query

count

Query count

completion

Completion callback